package com.alibaba.nacos.api.remote;

import com.alibaba.nacos.api.remote.response.Response;
import com.google.common.util.concurrent.MoreExecutors;

import java.util.concurrent.Executor;

public interface RequestCallBack<T extends Response> {
     default long getTimeout() {
         return 3000000L;
     };

    void onResponse(T response);

    void onException(Throwable e);

    default Executor getExecutor() {
        return MoreExecutors.directExecutor();
    }
}
